package top.tangyh.lamp.care.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import top.tangyh.basic.base.mapper.SuperMapper;
import top.tangyh.lamp.care.entity.BPgpfDept;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 评估评分部门关系表
 * </p>
 *
 * @author zqb
 * @date 2024-07-09 16:40:05
 * @create [2024-07-09 16:40:05] [zqb] [代码生成器生成]
 */
@Repository
public interface BPgpfDeptMapper extends SuperMapper<BPgpfDept> {

    default List<BPgpfDept> selectListByDeptIdList(List<Long> deptIdList) {
        LambdaQueryWrapper<BPgpfDept> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(BPgpfDept::getDeptId, deptIdList);
        return this.selectList(queryWrapper);
    }

    default List<BPgpfDept> selectListByPgids(List<Long> ids){
        LambdaQueryWrapper<BPgpfDept> wrapper = new LambdaQueryWrapper<>();
        wrapper.in(BPgpfDept::getPgId,ids);
        return this.selectList(wrapper);
    }

    default List<BPgpfDept> selectListByPgid(Long id){
        LambdaQueryWrapper<BPgpfDept> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BPgpfDept::getPgId,id);
        return this.selectList(wrapper);
    }

    default void deleteByPgid(Long pgid){
        LambdaQueryWrapper<BPgpfDept> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BPgpfDept::getPgId,pgid);
        this.delete(wrapper);
    }
}


